|
|
|
|
|
|
|
Figure 17.16
A sphere surrounded by RayCheckerboard objects. |
|
|
|
|
|
|
|
|
points you specify can lie at the ends of the cylinder. Figure 17.17 shows a finite cylinder specified by the points P1 and P2. |
|
|
|
|
|
|
|
|
If P1 = (x1, y1, z1) and P2 = (x2, y2, z2), you can write the parametric equations for a cylinder's axis as: |
|
|
|
 |
|
|
|
|
X(u) = x1 + Wx * u
Y(u) = y1 + Wy * u
Z(u) = z1 + Wy * u |
|
|
|
 |
|
|
|
|
Wx = x2 - x1
Wy = y2 - y1
Wz = z2 - z1
0 <= u <= 1 |
|
|
|
|
|